package com.neudu.yiyang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName incident
 */
@TableName(value ="incident")
@Data
public class Incident implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer customerId;

    /**
     * 
     */
    private String incidentType;

    /**
     * 
     */
    private Date incidentTime;

    /**
     * 
     */
    private String location;

    /**
     * 
     */
    private String discoverer;

    /**
     * 
     */
    private String disposalResult;

    /**
     * 
     */
    private Integer isNotified;

    /**
     * 
     */
    private String notes;

    /**
     * 
     */
    private String notifier;

    /**
     * 
     */
    private Date notificationTime;

    /**
     * 
     */
    private Integer isDeleted;

    /**
     * 
     */
    private Date createdAt;

    /**
     * 
     */
    private Date updatedAt;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getIncidentType() {
        return incidentType;
    }

    public void setIncidentType(String incidentType) {
        this.incidentType = incidentType;
    }

    public Date getIncidentTime() {
        return incidentTime;
    }

    public void setIncidentTime(Date incidentTime) {
        this.incidentTime = incidentTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getDiscoverer() {
        return discoverer;
    }

    public void setDiscoverer(String discoverer) {
        this.discoverer = discoverer;
    }

    public String getDisposalResult() {
        return disposalResult;
    }

    public void setDisposalResult(String disposalResult) {
        this.disposalResult = disposalResult;
    }

    public Integer getIsNotified() {
        return isNotified;
    }

    public void setIsNotified(Integer isNotified) {
        this.isNotified = isNotified;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getNotifier() {
        return notifier;
    }

    public void setNotifier(String notifier) {
        this.notifier = notifier;
    }

    public Date getNotificationTime() {
        return notificationTime;
    }

    public void setNotificationTime(Date notificationTime) {
        this.notificationTime = notificationTime;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String customerName;

    /**
     * 家属姓名（关联字段，用于显示）
     */
    @TableField(exist = false)
    private String familyMember;

    /**
     * 家属电话（关联字段，用于显示）
     */
    @TableField(exist = false)
    private String contectTel;

    /**
     * 客户性别（关联字段，用于显示）
     */
    @TableField(exist = false)
    private Integer customerSex;

    public String getContectTel() {
        return contectTel;
    }

    public void setContectTel(String contectTel) {
        this.contectTel = contectTel;
    }

    public Integer getCustomerSex() {
        return customerSex;
    }

    public void setCustomerSex(Integer customerSex) {
        this.customerSex = customerSex;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Incident other = (Incident) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getIncidentType() == null ? other.getIncidentType() == null : this.getIncidentType().equals(other.getIncidentType()))
            && (this.getIncidentTime() == null ? other.getIncidentTime() == null : this.getIncidentTime().equals(other.getIncidentTime()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getDiscoverer() == null ? other.getDiscoverer() == null : this.getDiscoverer().equals(other.getDiscoverer()))
            && (this.getDisposalResult() == null ? other.getDisposalResult() == null : this.getDisposalResult().equals(other.getDisposalResult()))
            && (this.getIsNotified() == null ? other.getIsNotified() == null : this.getIsNotified().equals(other.getIsNotified()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getNotifier() == null ? other.getNotifier() == null : this.getNotifier().equals(other.getNotifier()))
            && (this.getNotificationTime() == null ? other.getNotificationTime() == null : this.getNotificationTime().equals(other.getNotificationTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getIncidentType() == null) ? 0 : getIncidentType().hashCode());
        result = prime * result + ((getIncidentTime() == null) ? 0 : getIncidentTime().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getDiscoverer() == null) ? 0 : getDiscoverer().hashCode());
        result = prime * result + ((getDisposalResult() == null) ? 0 : getDisposalResult().hashCode());
        result = prime * result + ((getIsNotified() == null) ? 0 : getIsNotified().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getNotifier() == null) ? 0 : getNotifier().hashCode());
        result = prime * result + ((getNotificationTime() == null) ? 0 : getNotificationTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customerId=").append(customerId);
        sb.append(", incidentType=").append(incidentType);
        sb.append(", incidentTime=").append(incidentTime);
        sb.append(", location=").append(location);
        sb.append(", discoverer=").append(discoverer);
        sb.append(", disposalResult=").append(disposalResult);
        sb.append(", isNotified=").append(isNotified);
        sb.append(", notes=").append(notes);
        sb.append(", notifier=").append(notifier);
        sb.append(", notificationTime=").append(notificationTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}